package com.haixiaoke.saas.order.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.haixiaoke.saas.common.annotation.Excel;
import com.haixiaoke.saas.common.core.domain.BaseEntity;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;


/**
 * 订单审核记录对象 biz_order_audit_record
 *
 * @author qixi
 * @date 2024-04-02
 */
@Data
public class OrderAuditRecord extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Long recordId;

    /**
     * 租户id
     */
    @Excel(name = "租户id")
    private String tenantId;

    /**
     * 订单id
     */
    @Excel(name = "订单id")
    private String orderId;

    /**
     * 子订单id
     */
    @Excel(name = "子订单id")
    private String afterOrderId;

    /**
     * 订单快照记录
     */
    @Excel(name = "订单快照记录")
    @JsonIgnore
    private String orderContent;

    /**
     * 审核记录类型：1 2退租 3换房 4转租 5续租 6取消预订
     */
    @Excel(name = "审核记录类型", readConverterExp = "1=签约,2=退租,3=换房,4=转租,5=续租,6=取消预订", combo = {"签约", "退租", "换房", "转租", "续租", "6取消预订"})
    private String auditRecordType;

    /**
     * 审核记录状态：1待审核 2通过 3不通过
     */
    @Excel(name = "审核记录状态", readConverterExp = "1=待审核,2=通过,3=不通过", combo = {"待审核", "通过", "不通过"})
    private String auditRecordState;

    /**
     * 审核过程:1待处理 2退款中 3已驳回 4退款异常 5退款成功
     */
    @Excel(name = "审核过程", readConverterExp = "1=待处理,2=退款中,3=已驳回,4=退款异常,5=退款成功", combo = {"待处理", "退款中", "已驳回", "退款异常", "退款成功"})
    private String auditProcess;

    /**
     * 申请审核来源:1小程序退订 2企业端退订
     */
    @Excel(name = "申请审核来源", readConverterExp = "1=小程序退订,2=企业端退订", combo = {"小程序退订", "企业端退订"})
    private String auditSource;

    /**
     * 审核时间
     */
    @Excel(name = "审核时间")
    private Date auditTime;

    /**
     * 承租者
     */
    @Excel(name = "承租者")
    private String lodgerName;

    /**
     * 承租者手机号
     */
    @Excel(name = "承租者手机号")
    private String lodgerPhone;

    /**
     * 房源地址
     */
    @Excel(name = "房源地址")
    private String address;

    /**
     * 操作人id
     */
    @Excel(name = "操作人id")
    private Long operatorId;

    private Order order;

    /**
     * 入住时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date checkInTime;

    /**
     * 离开时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date checkOutTime;

    /**
     * 订单收费项目
     */
    private List<OrderChargeItem> orderChargeItemList;

    /**
     * 订单房费每日收费项
     */
    private List<OrderHousingExpenses> orderHousingExpensesList;

    /**
     * 订单退款项目
     */
    private List<OrderRefundItem> orderRefundItemList;

    /**
     * 订单房费每日退款项
     */
    private List<OrderRefundDetails> orderRefundDetailsList;

    /**
     * 退款详情id集合
     */
    private List<Long> refundDetailsIds;

    /**
     * 订单状态记录信息
     */
    private OrderStateRecord orderStateRecord;
    /**
     * 订单退费信息
     */
    private OrderRefundItem orderRefundItem;
    /**
     * 操作者姓名
     */
    private String operatorName;
}
